import axios from "axios"

const http={
    install(Vue,options={}){
        let {timeout}=options
        let instance=axios.create({
            baseURL:"/api",
            timeout:timeout||3000
        })
        Object.defineProperty(Vue.prototype,"$http_login",{
            value:instance
        })
        let instance2=axios.create({
            baseURL:"/farm",
            timeout:timeout||3000
        })
        Object.defineProperty(Vue.prototype,"$http",{
            value:instance2
        })
    }
}
export default http